home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
network
/
net_co41.zip
/
netcont_.exe
/
TESTDISK.BAT
< prev
Wrap
DOS Batch File
|
1994-02-17
|
3KB
|
69 lines
@ECHO OFF
GOTO START
:EXPLAIN
ECHO ---------------------- TESTDISK.BAT --------------------------------
ECHO - Batch programm for calling Net-Control with daily automatically -
ECHO - program stop for testing the logical structure of the harddisk. -
ECHO - -
ECHO - Only if no error is recognized Net-Control is started again. -
ECHO - For testing the logical structure of the harddisk the output of -
ECHO - the DOS program CHKDSK is written to a file (TESTDISK.OUT) -
ECHO - and this file is compared with a "correct" output of CHKDSK -
ECHO - from the file TESTDISK.OK". -
ECHO - If no differences between these file, which are caused by a -
ECHO - corrupted file structure, are noticed, Net-Control will be -
ECHO - started again. -
ECHO - -
ECHO - Before using this batch program you have to write the file -
ECHO - TESTDISK.OK by "CHKDSK > TESTDISK.OK"! -
ECHO - And check, that your harddisk is ok now!
ECHO - Furthermore you have to check, if you have to make special -
ECHO - calls before and after CHKDSK. If you are accessing a drive used -
ECHO - by a network, this network has to be disabled during CHKDSK runs. -
ECHO - (C) RzK Doris Köpke 03/93 -
ECHO -------------------------------------------------------------------------
REM This message will only appear, if the file TESTDISK.OK is missing.
ECHO --------------------------------------------------------------
ECHO - You hav'nt created the file TESTDISK.OK ! -
ECHO --------------------------------------------------------------
PAUSE
GOTO END
:START
IF NOT EXIST TESTDISK.OK GOTO EXPLAIN
:NC
REM *****************************************************************
REM *** Of course, you may change this point in time 00:30:00 ... ***
REM *****************************************************************
CALL NC-START GO STOP 00:30:00
REM Net-Control stops at 00:30 automatically with ERRORLEVEL 100
IF ERRORLEVEL 100 GOTO T-DISK
REM If Net-Control was stopped by manual input, quit this batch programm:
GOTO END
:T-DISK
REM Disable network ? e.g.: NW PAUSE
CHKDSK > TESTDISK.OUT
REM Enable network again ? e.g.: NW CONTINUE
COMP-OUT TESTDISK.OUT TESTDISK.OK
REM Compare output of CHKDSK with "correct" output.
IF ERRORLEVEL 2 GOTO EXPLAIN
REM this means: TESTDISK.OK is missing.
IF ERRORLEVEL 1 GOTO ERROR
GOTO NC
:ERROR
ECHO --------------------------------------------------------------
ECHO - The structure of this harddisk seems to be corrupted ! -
ECHO --------------------------------------------------------------
ECHO Output of CHKDSK:
ECHO =================
TYPE TESTDISK.OUT
PAUSE
:END